#include<stdio.h>
#include<fcntl.h>
#include<unistd.h>
int main(void){

    char buf[64]={0};

    int flag = 0;
    flag = fcntl(0,F_GETFL);
    flag|=O_NONBLOCK;
    fcntl(0,F_SETFL,flag);

    int i =0;
    while(1){
        gets(buf);
        printf("buf:=%s\n",buf);
    }
    return 0;
}